<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/warehouse/overtimeabolish_form_edit.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/overtimeabolish_form/overtimeabolish_form_editEntity.shtml">
		<input type="hidden" class="form-control checkacc"
			value="${over.id}" name="overtimeanalyzeFormMap.id" id="id">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-3 control-label">物料编码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${over.material_code}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">模具</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${over.mold_code}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">客户名称</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${over.cname}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">最后进仓</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" id="finalEnterDate" readonly
						value="${over.finalEnterDate}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">超期天数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${over.storageDay}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">产品单价</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" id="price" readonly
						value="${over.price}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<input type="hidden" id="orderPack" readonly value="${over.orderPack}" />
			<!-- 开始超期报废申请表 -->
			<div class="form-group">
				<label class="col-sm-3 control-label">包数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" id="packs"
						name="overtimeanalyzeFormMap.packs" value="${over.packs}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">件数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" id="pieces" readonly
						name="overtimeanalyzeFormMap.pieces" value="${over.pieces}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">报废原因</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" id="abolishReason"
						name="overtimeanalyzeFormMap.abolishReason" value="${over.abolishReason}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">合计金额</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" id="total" readonly
						name="overtimeanalyzeFormMap.total" value="${over.total}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">责任人</label>
				<div class="col-sm-9">
					<select  class="form-control" id="dutyPeopleId" name="overtimeanalyzeFormMap.dutyPeopleId">
						<c:forEach var="u" items="${users}" >
							<c:if test="${u.position_id==1 || u.position_id==2 || u.position_id==3}">
								<option value="${u.id}" ${u.id==over.dutyPeopleId?'selected':'' }>${u.userName }</option>	
							</c:if>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">金额</label>
				<div class="col-sm-9">
					<input type="number" min="0" class="form-control checkabh" id="dutyAmount"
						name="overtimeanalyzeFormMap.dutyAmount" value="${over.dutyAmount}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">计划员</label>
				<div class="col-sm-9">
					<select  class="form-control" id="abolishPlannerId" name="overtimeanalyzeFormMap.abolishPlannerId">
						<c:forEach var="u" items="${users}" >
							<c:if test="${u.position_id==1 || u.position_id==2 || u.position_id==3}">
								<option value="${u.id}" ${u.id==over.abolishPlannerId?'selected':'' }>${u.userName }</option>	
							</c:if>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">金额</label>
				<div class="col-sm-9">
					<input type="text" type="number" min="0" class="form-control checkabh" id="palnAmount"
						name="overtimeanalyzeFormMap.palnAmount" value="${over.palnAmount}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>
	<script type="text/javascript">
		$(function() {
			$("#packs").change(function() {
				var orderPack = $("#orderPack").val();
				var packs = $("#packs").val();
				var price = $("#price").val();
				$("#pieces").val(orderPack*packs);
				$("#total").val(orderPack*packs*price);
			});
		});
	</script>
</body>
</html>